<!--
 * @Author: byron
 * @Date: 2021-09-28 19:45:29
 * @LastEditTime: 2021-10-02 18:28:13
-->
<template>
    <div class="search">
        <el-input
            placeholder="请输入内容"
            v-model="inputValue"
            prefix-icon="el-icon-search"
            @keyup.enter.native="goSearch"
        >
        </el-input>
    </div>
</template>

<script>
export default {
    components: {},
    props: {},
    data() {
        return {
            inputValue: '',
        }
    },
    watch: {},
    computed: {},
    methods: {
        goSearch() {
            this.$router.push({ path: `/search/${this.inputValue}` })
        },
    },
    created() {},
    mounted() {},
}
</script>
<style lang="scss" scoped>
.search {
    width: 150px;
}
</style>
